package service.impl.v2;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import dao.v2.ConfigVOMapper;
import model.ShareVO;
import service.v2.ShareService;
@Service
public class ShareServiceImpl implements ShareService {
	@Autowired
	private ConfigVOMapper ConfigDao;
	
	@Override
	public ShareVO packageshareInfo(String invite_no){
		ShareVO shareVO = new ShareVO();
		
		shareVO.setContent("注册即可获得会员折扣体验券，体验1个月的会员购物折扣");
		shareVO.setImage(ConfigDao.loadConfig("APP_LOGO")+"?x-oss-process=image/resize,h_100");
		shareVO.setTitle("快来领"+ConfigDao.loadConfig("APP_NAME")+"会员折扣体验券（1个月），购物尽享会员折扣");
		if(invite_no!=null){
			shareVO.setUrl(ConfigDao.loadConfig("WECHAT_HOST")+"/invite_newMember?ym_share_inviteno="+invite_no);
		}else{
			shareVO.setUrl(ConfigDao.loadConfig("WECHAT_HOST")+"/invite_newMember");
		}
		return shareVO;
	}

	@Override
	public ShareVO packageOrdinaryMemberShareInfo() {
		// 
		ShareVO shareVO = new ShareVO();
		
		shareVO.setContent(ConfigDao.loadConfig("APP_NAME")+"带你挑选年度最热单品，会员优惠享不停，分享好物还可赚钱！");
		shareVO.setImage(ConfigDao.loadConfig("MEMBER_VIP_LOGO")+"?x-oss-process=image/resize,h_100");
		shareVO.setTitle("【"+ConfigDao.loadConfig("APP_NAME")+"会员卡】会员升级，享专属特惠");
		shareVO.setUrl(ConfigDao.loadConfig("WECHAT_HOST")+"/member_createMember");
		return shareVO;
	}

}
